echo windows : copy *.dll to build dir.
@echo off
set "workspace=%cd%/"
set "arch=x86"
set "builddir=%workspace%/build"
set "pkg=%workspace%/pkg"
echo workspace: %workspace%

set /a count=0
for /f "delims=" %%i in ('dir /ad/b "%pkg%"') do (
    if exist "%pkg%/%%i/lib/windows/%arch%/" (
        cd "%pkg%/%%i/lib/windows/%arch%/"
        for /f "delims=" %%j in ('dir /b /a-d /s "*.dll"') do (
            if exist %%j (
                echo copy %%j
                copy /y/b "%%j" "%builddir%"
                set /a count+=1
            )
        )
    )
)

cd %workspace%

echo Done! copy *.dll count %count%
